<template>
	<view class="shop-info" v-else-if="pageIndex === 2">
		<view class="address">
			<i class="icon mt-location-o"></i>
			<span>上海市闵行区龙茗路1888号</span>
			<i class="icon mt-phone-o"></i>
		</view>
		<view class="archive">
			<i class="icon mt-security-o"></i>
			<span>查看食品安全档案</span>
			<i class="icon mt-arrow-right-o"></i>
		</view>
		<view class="delivery">
			<view class="top">
				<i class="icon mt-service-o"></i>
				<span>配送服务：由美团快递提供配送服务</span>
			</view>
			<view class="btm">
				<i class="icon mt-clock-s"></i>
				<span>配送时间：09:50-23:59</span>
			</view>
		</view>
		<view class="service">
			<view class="top">
				<i class="icon mt-selected-o"></i>
				<span class="l">商家服务：</span>
				<span class="k">订</span>
				<span class="v">跨天预订</span>
				<span class="k" :style="{'margin-left': 10 + 'rpx'}">取</span>
				<span class="v">到店自取（享优惠）</span>
			</view>
			<view class="discounts">
				<view class="item" v-for="(item, index) in shopInfo.discounts2" :key="index">
					<img :src="item.icon_url">
					<span>{{item.info}}</span>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {mapGetters} from 'vuex'
	export default {
		name: 'Merchant',
		data() {
			return {
				
			}
		},
		computed: {
			...mapGetters(['shopInfo'])
		}
	}
</script>

<style lang="scss" scoped>
.shop-info {
	display: flex;
	position: fixed;
	top: 220rpx;
	flex-direction: column;
	width: 100%;
	height: 100%;
	.address {
		display: flex;
		align-items: center;
		height: 70rpx;
		margin-top: 20rpx;
		background-color: white;
		padding: 0 20rpx;
		i {
			font-size: 38rpx;
			color: $textGray-color;
		}
		i:last-child {
			color: $textBlack-color;
		}
		span {
			flex: 1;
			margin: 0 20rpx;
			font-size: 24rpx;
			color: $textBlack-color;
		}
	}
	.archive {
		@extend .address;
		i:last-child {
			font-size: 24rpx;
			color: $textGray-color;
		}
	}
	.delivery {
		display: flex;
		flex-direction: column;
		margin-top: 20rpx;
		background-color: white;
		padding: 0 16rpx;
		.top {
			display: flex;
			align-items: center;
			height: 80rpx;
			padding-left: 10rpx;
			border-bottom: 2rpx solid $spLine-color;
			i {
				font-size: 32rpx;
				color: $textGray-color;
			}
			span {
				font-size: 24rpx;
				color: $textBlack-color;
				margin: 0 20rpx;
			}
		}
		.btm {
			@extend .top;
			border-bottom: 0 solid $spLine-color;
		}
	}
	.service {
		display: flex;
		flex-direction: column;
		margin-top: 20rpx;
		background-color: white;
		padding: 0 16rpx;
		.top {
			display: flex;
			align-items: center;
			height: 80rpx;
			padding-left: 14rpx;
			border-bottom: 2rpx solid $spLine-color;
			i {
				font-size: 28rpx;
				color: $textGray-color;
			}
			.l {
				font-size: 24rpx;
				color: $textBlack-color;
				margin-left: 20rpx;
			}
			.k {
				width: 30rpx;
				height: 30rpx;
				align-items: center;
				justify-content: center;
				display: flex;
				text-align: center;
				border: 2rpx solid #0095D8;
				color: #0095D8;
				font-size: 20rpx;
				margin-left: 10rpx;
			}
			.v {
				font-size: 24rpx;
				color: $textBlack-color;
				margin-left: 10rpx;
			}
		}
		.discounts {
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			padding: 0 16rpx;
			padding-bottom: 20rpx;
			.item {
				display: flex;
				align-items: center;
				height: 60rpx;
				margin-top: 10rpx;
				img {
					width: 30rpx;
					height: 30rpx;
				}
				span {
					font-size: 24rpx;
					color: $textBlack-color;
					margin-left: 20rpx;
				}
			}
		}
	}
}	
</style>